<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-saq-add">
		<!--<div class="form-group">	-->
		<!--<label class="col-sm-3 control-label">用户ID：</label>-->
		<!--<div class="col-sm-9">-->
		<!--<input id="userId" name="userId" class="form-control" type="text">-->
		<!--</div>-->
		<!--</div>-->
		<!--<div class="form-group">	-->
		<!--<label class="col-sm-3 control-label">人员借调申请表编号：</label>-->
		<!--<div class="col-sm-9">-->
		<!--<input id="saqNum" name="saqNum" class="form-control" type="text">-->
		<!--</div>-->
		<!--</div>-->


		<div class="form-group">
			<label class="col-sm-3 control-label">普工：</label>
			<div class="col-sm-3">
				<input id="requestedone" name="requestedone" class="form-control" type="text">
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-3 control-label">缝工：</label>
			<div class="col-sm-3">
				<input id="requestedtwo" name="requestedtwo" class="form-control" type="text">
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-3 control-label">需求时间：</label>
			<div class="col-sm-4">
				<input id="startTime" name="startTime" class="form-control" type="datetime-local">
			</div>
			<div class="col-sm-4">
				<input id="finishTime" name="finishTime" class="form-control" type="datetime-local">
			</div>
		</div>

		<div class="form-group">
			<label class="col-sm-3 control-label">支持项目：</label>
			<div class="col-sm-8">
				<input id="supportingProject" name="supportingProject" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">客户：</label>
			<div class="col-sm-8">
				<input id="customer" name="customer" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">备注：</label>
			<div class="col-sm-8">
				<textarea type="text" id="remark" name="remark" rows="5" class="form-control" placeholder="请输入文本"></textarea>
			</div>

			<!--<div class="form-group">-->
			<!--&lt;!&ndash;<label class="col-sm-3 control-label">0待部门经理审核，1待生产部门审核，2待MD主管录入，3已完成录入：</label>&ndash;&gt;-->
			<!--&lt;!&ndash;<div class="col-sm-8">&ndash;&gt;-->
			<!--&lt;!&ndash;<input id="status" name="status" class="form-control" type="text">&ndash;&gt;-->
			<!--&lt;!&ndash;</div>&ndash;&gt;-->
			<!--<label class="col-sm-3 control-label">申请状态：</label>-->
			<!--<div class="col-sm-9">-->
			<!--<select class="form-control" name="status" th:with="type=${@dict.getType('sys_saq_status')}">-->
			<!--<option value="">所有</option>-->
			<!--<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
			<!--</select>-->
			<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
			<!--<label class="col-sm-3 control-label">删除标志（0代表存在 2代表删除）：</label>-->
			<!--<div class="col-sm-8">-->
			<!--<input id="delFlag" name="delFlag" class="form-control" type="text">-->
			<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
			<!--<label class="col-sm-3 control-label">创建者：</label>-->
			<!--<div class="col-sm-8">-->
			<!--<input id="createBy" name="createBy" class="form-control" type="text">-->
			<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
			<!--<label class="col-sm-3 control-label">创建时间：</label>-->
			<!--<div class="col-sm-8">-->
			<!--<input id="createTime" name="createTime" class="form-control" type="text">-->
			<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
			<!--<label class="col-sm-3 control-label">更新者：</label>-->
			<!--<div class="col-sm-8">-->
			<!--<input id="updateBy" name="updateBy" class="form-control" type="text">-->
			<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
			<!--<label class="col-sm-3 control-label">更新时间：</label>-->
			<!--<div class="col-sm-8">-->
			<!--<input id="updateTime" name="updateTime" class="form-control" type="text">-->
			<!--</div>-->
			<!--</div>-->

	</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "system/saq"
    $("#form-saq-add").validate({
        rules:{
            xxxx:{
                required:true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-saq-add').serialize());
        }
    }

//    function submitHandler() {
//        if ($.validate.form()) {
//            var data = {
//                startTime:formatDate($("#startTime").val()),
//                finishTime:formatDate($("#finishTime").val()),
//                requestedone:$('#requestedone').val()
//			}
//            $.operate.save(prefix + "/add", data);
//        }
//    }

    function formatDate(times) {
        var date = new Date(times)
        var y = date.getFullYear()
        var m = date.getMonth() + 1
        m = m < 10 ? ('0' + m) : m
        var d = date.getDate()
        d = d < 10 ? ('0' + d) : d
        var h = date.getHours()
        h = h < 10 ? ('0' + h) : h
        var minute = date.getMinutes()
        minute = minute < 10 ? ('0' + minute) : minute
        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
    }
</script>
</body>
</html>
